from app.core.dependencies import SessionDep
from app.models.users import Users


class UserService:
    def __init__(self, session: SessionDep):
        self.session = session

    async def get_user_by_name(self, name: str):
        return self.session.query(Users).filter(Users.name == name).first()